<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib uri="http://www.goodfox.com/jsp/tags/power" prefix="p"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ page import="java.net.URLEncoder" %>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
%> 
<style type="text/css">
	ul.rightTools {float:right; display:block;}
	ul.rightTools li{float:left; display:block; margin-left:5px}
</style>
<script type="text/javascript">
$(function(){
	$("#excelName").val(encodeURI("林权证信息.xls"));
});
</script>
<div class="tabs">
	<div class="tabsHeader">
		<div class="tabsHeaderContent">
			<ul>
				<li><a href="javascript:;"><span>林权证列表</span></a></li>
			</ul>
		</div>
	</div>
	<div class="tabsContent">
		<div>
			<div class="panel collapse">
				<h1>高级查询</h1>
				<div>
					<form onsubmit="return navTabSearch(this);" action="<c:url value="/rights/goRightsIndex.shtml"/>" method="post">
					<div class="searchBar">
						<table class="searchContent">
							<tr>
								<td>坐落：</td>
								<td colspan="5">
									<input type="hidden" name="areaId" id="areaId" value="${areaId}"/>
			                    	<input type="text" name="areaName" id="areaName" value="${areaName}" readonly="readonly" size="100"/>
		                    		<a class="btnLook" href="<c:url value="/rights/goAreaMultiLookup.shtml"/>" lookupGroup="">选择所属地区</a>
		                    		<a class="btnClean" href="javascript:;" onclick="$('#areaId').val('');$('#areaName').val('');">清空</a>
								</td>
							</tr>
							<tr>
								<td>林权证编号：</td>
								<td>
									<input type="text" name="rights_query_rigCode" id="rights_query_rigCode" value="${rights_query_rigCode}" maxlength="20"/>
								</td>
								<td>林权证号：</td>
								<td colspan="3">
									<input type="text" name="rights_query_rigNumber" id="rights_query_rigNumber" value="${rights_query_rigNumber}" maxlength="20"/>
								</td>
							</tr>
							<tr>
								<td>法定代表人：</td>
								<td>
									<input type="text" name="rights_query_legal" id="rights_query_legal" value="${rights_query_legal}" maxlength="20"/>
								</td>
								<td>身份证号：</td>
								<td colspan="3">
									<input type="text" name="rights_query_idCards" id="rights_query_idCards" value="${rights_query_idCards}" maxlength="20"/>
								</td>
							</tr>
							<tr>
								<td>登记类型：</td>
								<td>
									<select name="rights_query_rstType" id="rights_query_rstType">
					                	<option value="">--请选择--</option>
					          			<c:forEach items="${rstTypeList}" var="atrRstType">
					           				<option value="${atrRstType.atrValue}" <c:if test="${atrRstType.atrValue==rights_query_rstType}">selected="selected" </c:if>>${atrRstType.atrName}</option>
					           			</c:forEach>
					                </select>
								</td>
								<td>是否抵押：</td>
								<td>
									<select name="rights_query_mortgage" id="rights_query_mortgage">
					                	<option value="">--请选择--</option>
					                	<option value="1" <c:if test="${'1'==rights_query_mortgage}">selected="selected" </c:if>>是</option>
					                	<option value="0" <c:if test="${'0'==rights_query_mortgage}">selected="selected" </c:if>>否</option>
					          		</select>
								</td>
								<td>是否退耕还林：</td>
								<td>
									<select name="rights_query_backForest" id="rights_query_backForest">
					                	<option value="">--请选择--</option>
					                	<option value="1" <c:if test="${'1'==rights_query_backForest}">selected="selected" </c:if>>是</option>
					                	<option value="0" <c:if test="${'0'==rights_query_backForest}">selected="selected" </c:if>>否</option>
					          		</select>
								</td>
							</tr>
							<tr>
								<td>林地所有权权利人：</td>
								<td>
									<select name="rights_query_fstOwn" id="rights_query_fstOwn">
					                	<option value="">--请选择--</option>
					          			<c:forEach items="${fstOwnList}" var="atrFstOwn">
					           				<option value="${atrFstOwn.atrValue}" <c:if test="${atrFstOwn.atrValue==rights_query_fstOwn}">selected="selected" </c:if>>${atrFstOwn.atrName}</option>
					           			</c:forEach>
					                </select>
								</td>
								<td>主要树种：</td>
								<td>
									<select name="rights_query_species" id="rights_query_species">
					                	<option value="">--请选择--</option>
					          			<c:forEach items="${speciesList}" var="atrSpecies">
					           				<option value="${atrSpecies.atrId}" <c:if test="${atrSpecies.atrId==rights_query_species}">selected="selected" </c:if>>${atrSpecies.atrName}</option>
					           			</c:forEach>
					                </select>
								</td>
								<td>造林年度：</td>
								<td>
									<input class="Wdate" type="text" id="rights_query_affDate" name="rights_query_affDate" onFocus="WdatePicker({dateFmt:'yyyy'})" readonly="readonly" value="${rights_query_affDate}"/>
								</td>
							</tr>
							<tr>
								<td>地类：</td>
								<td>
									<select name="rights_query_landType" id="rights_query_landType">
					                	<option value="">--请选择--</option>
					          			<c:forEach items="${landTypeList}" var="atrLandType">
					           				<option value="${atrLandType.atrValue}" <c:if test="${atrLandType.atrValue==rights_query_landType}">selected="selected" </c:if>>${atrLandType.atrName}</option>
					           			</c:forEach>
					                </select>
								</td>
								<td>森林分类：</td>
								<td>
									<select name="rights_query_fstType" id="rights_query_fstType">
					                	<option value="">--请选择--</option>
					          			<c:forEach items="${fstTypeList}" var="atrFstType">
					           				<option value="${atrFstType.atrValue}" <c:if test="${atrFstType.atrValue==rights_query_fstType}">selected="selected" </c:if>>${atrFstType.atrName}</option>
					           			</c:forEach>
					                </select>
								</td>
								<td>林种：</td>
								<td>
									<select name="rights_query_fstSpecies" id="rights_query_fstSpecies">
					                	<option value="">--请选择--</option>
					          			<c:forEach items="${fstSpeciesList}" var="atrFstSpecies">
					           				<option value="${atrFstSpecies.atrValue}" <c:if test="${atrFstSpecies.atrValue==rights_query_fstSpecies}">selected="selected" </c:if>>${atrFstSpecies.atrName}</option>
					           			</c:forEach>
					                </select>
								</td>
							</tr>
						</table>
						<div class="subBar">
							<ul>
								<li><div class="buttonActive"><div class="buttonContent"><button type="submit"><spring:message code="search.btnQuery"/></button></div></div></li>
							</ul>
						</div>
					</div>
					</form>
				</div>
			</div>
			<div id="jbsxBox" class="unitBox">
				<div class="pageContent" style="border-left: 1px solid #B8D0D6;border-right: 1px solid #B8D0D6;">
					<div class="panelBar">
						<ul class="toolBar">
					        <c:if test="${p:isPower('/rights/goRightsAdd.shtml',sessionScope.loginAccount)}">
					        <li><a class="add" href="<c:url value="/rights/goRightsAdd.shtml"/>" target="navTab" title="林权证<spring:message code="search.lnkGoAdd"/>"><span><spring:message code="search.btnGoAdd"/></span></a></li>
							</c:if>
					        <c:if test="${p:isPower('/rights/rightsRemoveBat.shtml',sessionScope.loginAccount)}">
							<li><a class="delete" href="<c:url value="/rights/rightsRemoveBat.shtml"/>" target="selectedTodo" rel="fstRigIdIds" title="确实要删除这些记录吗?"><span><spring:message code="search.btnRemoveBat"/></span></a></li>
							</c:if>
							<li class="line">line</li>
					        <c:if test="${p:isPower('/rights/exportRightsAll.shtml',sessionScope.loginAccount)}">
							<li><a class="icon" id="exportRights" target="dwzExport" targetType="navTab" title="确实要导出这些记录吗?" href="<c:url value="/rights/exportRightsAll.shtml"/>"><span><spring:message code="search.btnExportXls"/></span></a></li>
							</c:if>
						</ul>
					</div>
					<form id="pagerForm" method="post" action="<c:url value="/rights/goRightsIndex.shtml"/>">
						<input type="hidden" name="excelName" id="excelName" />
						<input type="hidden" name="pageNum" value="${pageNum}" />
						<input type="hidden" name="numPerPage" value="${numPerPage}" />
						<input type="hidden" name="rights_query_rigCode" value="${rights_query_rigCode}" />
						<input type="hidden" name="areaId" value="${areaId}">
						<input type="hidden" name="areaName" value="${areaName}" />
						<input type="hidden" name="rights_query_idCards" value="${rights_query_idCards}" />
						<input type="hidden" name="rights_query_legal" value="${rights_query_legal}" />
						<input type="hidden" name="rights_query_rstType" value="${rights_query_rstType}" />
						<input type="hidden" name="rights_query_mortgage" value="${rights_query_mortgage}" />
						<input type="hidden" name="rights_query_backForest" value="${rights_query_backForest}" />
						<input type="hidden" name="rights_query_fstOwn" value="${rights_query_fstOwn}" />
						<input type="hidden" name="rights_query_species" value="${rights_query_species}" />
						<input type="hidden" name="rights_query_affDate" value="${rights_query_affDate}" />
						<input type="hidden" name="rights_query_landType" value="${rights_query_landType}" />
						<input type="hidden" name="rights_query_fstType" value="${rights_query_fstType}" />
						<input type="hidden" name="rights_query_fstSpecies" value="${rights_query_fstSpecies}" />
					</form>
					<table class="table" width="300%" layoutH="320">
						<thead>
							<tr>
								<th width="22"><input type="checkbox" group="fstRigIdIds" class="checkboxCtrl"></th>
								<th width="100">林权证编号</th>
								<th width="70">林权证号</th>
								<th width="70">单位(个人)</th>
								<th width="70">法定代表人</th>
								<th width="130">身份证号</th>
								<th width="200">通讯地址</th>
								<th width="180">申请表编号</th>
								<th width="70">登记类型</th>
								<th width="70">是否抵押</th>
								<th width="90">是否退耕还林</th>
								<th width="110">林地所有权权利人</th>
								<th width="110">林地使用权权利人</th>
								<th width="150">森林或林木所有权权利人</th>
								<th width="150">森林或林木使用权权利人</th>
								<th width="70">坐落</th>
								<th width="80">小地名</th>
								<th width="50">林班</th>
								<th width="50">小班</th>
								<th width="50">面积</th>
								<th width="120">主要树种</th>
								<th width="70">蓄积或株数</th>
								<th width="70">造林年度</th>
								<th width="60">地类</th>
								<th width="80">森林分类</th>
								<th width="70">林种</th>
								<th width="100">林地试用期(年)</th>
								<th width="80">终止日期</th>
								<th>坡度</th>
								<th>坡向</th>
								<th>档案柜编号</th>
								<th>外业调查人</th>
								<th>经办人</th>
								<th>负责人</th>
								<th width="110">操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${rightsList}" var="rights">
							<c:forEach items="${rights.rsWoodlandList}" var="woodland" varStatus="j">
							<tr target="sid_user" rel="${rights.fstRigId}">
								<c:if test="${j.index==0}">
								<td rowspan="${fn:length(rights.rsWoodlandList)}"><input name="fstRigIdIds" value="${rights.fstRigId}" type="checkbox"></td>
								<td rowspan="${fn:length(rights.rsWoodlandList)}">${rights.rigCode}</td>
								<td rowspan="${fn:length(rights.rsWoodlandList)}">${rights.rigNumber}</td>
								<td rowspan="${fn:length(rights.rsWoodlandList)}">${rights.unit}</td>
								<td rowspan="${fn:length(rights.rsWoodlandList)}">${rights.legal}</td>
								<td rowspan="${fn:length(rights.rsWoodlandList)}">${rights.idCards}</td>
								<td rowspan="${fn:length(rights.rsWoodlandList)}">${rights.address}</td>
								</c:if>
								<td>${woodland.appNumber}</td>
								<td>${woodland.rstTypeTxt}</td>
								<td><c:if test="${woodland.mortgage==1}">是</c:if><c:if test="${woodland.mortgage==0}">否</c:if></td>
								<td><c:if test="${woodland.backForest==1}">是</c:if><c:if test="${woodland.backForest==0}">否</c:if></td>
								<td>${woodland.fstOwnTxt}</td>
								<td>${woodland.fstUse}</td>
								<td>${woodland.woodOwn}</td>
								<td>${woodland.woodUse}</td>
								<td>${woodland.areaName}</td>
								<td>${woodland.smallTo}</td>
								<td>${woodland.fstClass}</td>
								<td>${woodland.smallCls}</td>
								<td>${woodland.acreage}</td>
								<td>${woodland.speciesTxt}</td>
								<td>${woodland.treesNum}</td>
								<td><fmt:formatDate value="${woodland.affDate}" pattern="yyyy"/></td>
								<td>${woodland.landTypeTxt}</td>
								<td>${woodland.fstTypeTxt}</td>
								<td>${woodland.fstSpeciesTxt}</td>
								<td>${woodland.fstUseDate}</td>
								<td><fmt:formatDate value="${woodland.endDate}" pattern="yyyy-MM-dd"/></td>
								<td>${woodland.slope}</td>
								<td>${woodland.aspect}</td>
								<td>${woodland.cabinetNum}</td>
								<td>${woodland.invPerson}</td>
								<td>${woodland.hdePerson}</td>
								<td>${woodland.crgPerson}</td>
								<c:if test="${j.index==0}">
								<td rowspan="${fn:length(rights.rsWoodlandList)}">
					        		<c:if test="${p:isPower('/rights/goRightsPrint.shtml',sessionScope.loginAccount)}">
									<a title="林权证<spring:message code="search.lnkGoPrint"/>" target="_blank" href="<c:url value="/rights/goRightsPrint.shtml"/>?fstRigId=${rights.fstRigId}" class="btnPrint"><spring:message code="search.lnkGoPrint"/></a>
									</c:if>
					        		<c:if test="${p:isPower('/rights/goRightsDetail.shtml',sessionScope.loginAccount)}">
									<a title="林权证<spring:message code="search.lnkGoDetail"/>" target="navTab" rel="rightsShowPage" href="<c:url value="/rights/goRightsDetail.shtml"/>?fstRigId=${rights.fstRigId}" class="btnView"><spring:message code="search.lnkGoDetail"/></a>
									</c:if>
					        		<c:if test="${p:isPower('/rights/goRightsModify.shtml',sessionScope.loginAccount)}">
									<a title="林权证<spring:message code="search.lnkGoModify"/>" target="navTab" rel="rightsShowPage" href="<c:url value="/rights/goRightsModify.shtml"/>?fstRigId=${rights.fstRigId}" class="btnEdit"><spring:message code="search.lnkGoModify"/></a>
									</c:if>
					        		<c:if test="${p:isPower('/rights/rightsRemove.shtml',sessionScope.loginAccount)}">
									<a title="林权证<spring:message code="search.lnkRemove"/>" target="ajaxTodo" href="<c:url value="/rights/rightsRemove.shtml"/>?fstRigId=${rights.fstRigId}" class="btnDel"><spring:message code="search.lnkRemove"/></a>
									</c:if>
								</td>
								</c:if>
							</tr>
							</c:forEach>
							</c:forEach>
						</tbody>
					</table>
					<div class="panelBar">
						<div class="pages">
							<span>显示</span>
							<select class="numPerPageSet" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
								<option value="15">15</option>
								<option value="30">30</option>
								<option value="50">50</option>
							</select>
							<span>条，共${totalCount}条</span>
							<span>&lt;林权证：${totalCount}本。</span>
							<span>林地数：${woodlandCount}块。</span>
							<span>总面积：<fmt:formatNumber value="${acreageTotal}" pattern="0.00"/>亩&gt;</span>
						</div>
						<div class="pagination" targetType="navTab" totalCount="${totalCount}" numPerPage="${numPerPage}" pageNumShown="5" currentPage="${currentPage}"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="tabsFooter">
		<div class="tabsFooterContent"></div>
	</div>
</div>
